package main

import (
	mux "github.com/julienschmidt/httprouter"
)

type Route struct {
	Name    string
	Method  string
	Pattern string
	Handle  mux.Handle
}

type Routes []Route

var routes = Routes{
	Route{
		"Index",
		"GET",
		"/",
		Index,
	},
	Route{
		"PostIndex",
		"GET",
		"/posts",
		PostIndex,
	},
	Route{
		"PostShow",
		"GET",
		"/posts/:postId",
		PostShow,
	},
	Route{
		"PostCreate",
		"GET",
		"/posts",
		PostCreate,
	},
	Route{
		"PostDelete",
		"POST",
		"/posts/del/:postId",
		PostDelete,
	},
}
